<?php
namespace Index\Controller;
use Think\Controller;
use Index\Controller\CommonController;
class AnswerController extends CommonController {
    public function addAction(){
       	$data['content'] = I('post.content','');
       	$data['qid'] = I('post.qid','');
       	$data['uid'] = $_SESSION['id'];
       	$data['create_time'] = time();
       	M('answer')->add($data);
       	$this->success('回复成功',U('index/question/index',array('qid'=>$data['qid'])));
    }
}